package cn.wolfcode.rbac.mapper;

import cn.wolfcode.rbac.domain.Department;
import cn.wolfcode.rbac.domain.Employee;
import cn.wolfcode.rbac.query.QueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface DepartmentMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Department record);

    Department selectByPrimaryKey(Long id);

    List<Department> selectAll();

    int updateByPrimaryKey(Department record);

    /**
     *   查询数据库表中有多少条数据
     * @param queryObject
     * @return
     */
    int selectForCount(QueryObject queryObject);

    /**
     *  分页的方法
     * @param queryObject
     * @return
     */
    List<Department> selectForList(QueryObject queryObject);

    Employee selectEmpByUsernameAndPassword(@Param("username") String username, @Param("password") String password);
}